body {
  background: #f6f7fa url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="2" fill="%23e0e3e7"/><circle cx="38" cy="38" r="2" fill="%23e0e3e7"/></svg>');
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
}

/* Sections */
.section {
    font-size: 18px;
    padding: 20px;
    background-color: #fff;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    color: black;
}

.noir {
    font-size: 50px;
    color: rgb(0, 0, 0);
    font-weight: bolder;
}

.rouge {
    font-size:50px ;
    color: red;
    font-weight: bolder;
}

/* Styles pour l'onglet Bien débuter */
#debuter .content-container {
  padding: 20px;
  background-color: #fff;
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  color: black;
}


#debuter h2 {
  font-size: 30px;
  margin-bottom: 0.7em;
  color: #000000;
  font-weight: bold;
  border-bottom: 2px solid #222;
  padding-bottom: 0.22em;
}

#debuter h3 {
  font-size: 24px;
  color: #000000;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  margin-top: 30px;
  margin-bottom: 15px;
}

#debuter p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

#debuter ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

#debuter li {
  margin-bottom: 8px;
  line-height: 1.5;
}

#debuter .note {
  background: #f8f9fa;
  border-left: 4px solid #4a6baf;
  padding: 12px 15px;
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.5;
}

/* Styles pour les onglets */
.tabs-container {
  width: 100%;
  margin: 20px 0 30px;
  overflow: hidden;
  position: relative;
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-behavior: smooth;
  padding-bottom: 5px;
  gap: 8px;
}

.tabs::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.tab-button {
  flex: 0 0 auto;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  margin-right: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-button:last-child {
  margin-right: 0;
}

.tab-button:hover {
  background: #e9e9e9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tab-button.active {
  background: #ffffff;
  color: white;
  border-color: #4a6baf;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(74, 107, 175, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .tabs {
    justify-content: flex-start;
    padding: 5px 15px;
  }
}

/* Titres généraux */
h1, h2, h3 {
    color: #000000;
    text-align: left;
    font-weight: bold;

}

h1 {
    text-align: left;
    margin-bottom: 20px;
    color: black;
    font-weight: bold;
}

.analysez {
    font-size: 20px;
    text-align: left;
    margin-bottom: 20px;
    color: black;
    margin-top: -15px;
    margin-left: 20px;
}

h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: black;
    font-size: 30px;
}

/* Titres de section spécifiques */
.titre-principal {
    text-align: center;
    font-size: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
    color: #ffffff;
    white-space: nowrap; /* Garde le titre sur une seule ligne */
}

.performance-title {
    font-family: Rajdhani, sans-serif;
    font-size: 30px;
    color: #1a1a1a; /* Couleur principale noire foncée */
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
    margin-bottom: 5px;
    margin-top: 20px;
}
.performance {
    font-family: Arial, sans-serif;
    font-size: 30px;
    color: #1a1a1a; /* Couleur principale noire foncée */
    position: relative;
    display: inline-block;
    margin-top:0px;
    margin-bottom: 40px;
}
.icone-technique {
  height: 80px;
  width: auto;
  vertical-align: middle;
  margin-right:-10px;
  font-size: 2px;
}

  .form-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: #f4f4f4;
    border-radius: 8px;
    max-width: 400px;
  }
.icone-performance {
  height: 60px;
  width: auto;
  vertical-align: middle;
  margin-right: px;
}

/* Labels */
.label-large {
    font-size: 35px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 25px;
    color: rgb(255, 245, 245);
    vertical-align: middle;
    white-space: nowrap;
    /* largeur fixe pour alignement (commentaire dans l'original) */
}

.label-large2 {
    font-size: 20px;
    display: block;
    margin-bottom: 6px;
    color: rgb(0, 0, 0);
}

.label-nom-circuit {
    font-size: 20px;
    display: block;
    margin-bottom: 20px;
    color: rgb(0, 0, 0);
    margin-top: 20px;
}

.label-nom-circuit select.input-block {
    display: block;
    margin-top: 5px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
}

.label-temp-piste,
.label-temp-exterieure {
    font-size: 20px;
    display: block;
    margin-bottom: 20px;
    margin-top: 20px;
    color: rgb(0, 0, 0);
    vertical-align: middle;
}

.label-input {
    font-size: 20px;
    display: block;
    margin-bottom: 20px;
    color: rgb(6, 5, 5);
}

.label-date-roulage {
    margin-bottom: 8px;
    display: block;
    margin-top: 20px;
}
.label-meteo {
    font-size: 20px;
    color: black;
    display: inline-block;
    margin-bottom: 0px;
    margin-top: 10px;
}
/* Inputs, selects, textarea */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="meteoSeggestion"],
select,
textarea {
  width: 220px;
  padding: 10px 12px;
  margin: 10px 0;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  color: #333;
  background-color: #f9f9f9;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  display: block;
  appearance: none; /* Pour un look plus propre sur certains navigateurs */
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210%22%20height%3D%226%22%20viewBox%3D%220%200%2010%206%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M1%201L5%205L9%201%22%20stroke%3D%22%23333%22%20stroke-width%3D%222%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}
.textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
  outline: none;
}
.flatpickr-calendar {
  background-color: #fffbe6;
}

.flatpickr-day.selected,
.flatpickr-day.today {
  background-color: #ffa500;
  color: #fff;
}

/* Inputs, selects et textarea avec focus */
.text-input,
.select-input,
.textarea-input {
    font-size: 1rem;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1.5px solid #ccc;
    color: #050404;
    font-family: 'Consolas', monospace;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    vertical-align: middle;
}

.textarea-input {
    height: auto;
    resize: vertical;
    color: #000000;
}

.text-input:focus,
.select-input:focus,
.textarea-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 6px #3498dbaa;
    color: #000000;
}

/* Boutons */
.btn-export-pdf {
  margin-top: 20px;
  padding: 15px 40px;
  background: linear-gradient(135deg, #007bff, #339cff);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
  margin-bottom: 20px;
}

.btn-export-pdf::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: skewX(-25deg);
  transition: opacity 0.3s ease;
  z-index: 2;
}

.btn-export-pdf:hover {
  animation: bounce 0.3s ease forwards;
  background: linear-gradient(135deg, #339cff, #007bff);
  box-shadow: 0 12px 25px rgba(0, 123, 255, 0.5);
}

.btn-export-pdf:hover::before {
  opacity: 1;
  left: 150%;
  transition: left 0.6s ease, opacity 0.6s ease;
  animation: flashMove 0.6s forwards;
}

@keyframes bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes flashMove {
  0% {
    left: -50%;
    opacity: 1;
  }
  100% {
    left: 150%;
    opacity: 0;
  }
}

/* Conteneurs spécifiques */
#anciensReglages {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
}

#historiqueRoulages {
    background-color: #f1f1f1;
}

.anciens-reglages {
    margin-top: 40px;
    font-size: 1rem;
    color: black;
}

.anciens-reglages h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* Connaissance */
.connaissance {
    color: #000000;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Mise en page roulage */
.roulage-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Styles pour le conteneur de chrono */
#chronoContainer {
    margin-top: 20px;
}

/* Styles pour le conteneur de diagnostic */
.diagnostic-form {
    margin: 20px 0;
}

.diagnostic-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
}

.diagnostic-form button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background 0.3s;
}

.diagnostic-form button:hover {
    background: #0056b3;
}

/* Styles pour les résultats du diagnostic */
#result {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.phase-analysis, .element-analysis, .consequences-analysis, .solutions-analysis {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.phase-analysis h4, .element-analysis h4, .consequences-analysis h4, .solutions-analysis h4 {
    color: #007bff;
    margin: 0 0 10px 0;
}

.suggestions {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
}

.suggestions h4 {
    color: #856404;
    margin: 0 0 10px 0;
}

.suggestions ul {
    margin: 0;
    padding-left: 20px;
}

.suggestions li {
    color: #856404;
    margin: 5px 0;
}

#aiSearchButton {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    transition: background 0.3s;
    display: block;
}

#aiSearchButton:hover {
    background: #218838;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #007bff;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles pour les résultats de l'IA */
.ai-solutions {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 4px;
    border-left: 4px solid #17a2b8;
}

.ai-solutions h4 {
    color: #17a2b8;
    margin: 0 0 10px 0;
}

.ai-solutions ul {
    margin: 0;
    padding-left: 20px;
}

.ai-solutions li {
    color: #333;
    margin: 5px 0;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
}

/* Styles pour les messages d'erreur */
.error {
    color: #dc3545;
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
    margin: 10px 0;
}

/* Styles pour les résultats du diagnostic */
.diagnostic-results {
    margin-top: 20px;
}

.diagnostic-results > div {
    margin-bottom: 20px;
}

.diagnostic-results h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.diagnostic-results ul {
    list-style: none;
    padding: 0;
}

.diagnostic-results li {
    padding: 10px;
    margin: 5px 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Bloc gauche */
.sub-section {
    flex: 1;
    min-width: 300px;
}

/* Bloc droite */
.circuit-plan-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 100%;
    text-align: right;
}

.circuit-plan-wrapper h2 {
    flex: 1;
    min-width: 300px;
    max-width: 100%;
    text-align: right;
    margin-bottom: -2px;
}

/* Image circuit */
#circuitPlan{
    position: relative;
    border: 1px solid #ccc;
    width: 100%;
    max-width: 1200px;
    height: auto;
    min-height: 400px;
    background: #f0f0f0;
    overflow: visible;
    display: block;
    margin: 0 auto;
}

/* Image à l'intérieur */
#circuitPlan img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 10px;
    max-width: 100%;
}

#circuitCanvas {
    width: 100%;
    height: auto;
    max-width: 600px;
    max-height: 400px;
}

/* Annotations améliorées */
#circuitPlan div {
    position: absolute;
    padding: 4px 8px;
    border: 1px solid #aaa;
    border-radius: 4px;
    cursor: move;
    font-size: 14px;
    user-select: none;
    z-index: 20;
}

/* Styles spécifiques pour les annotations */
.annotation-container {
    position: absolute;
    z-index: 20;
    cursor: grab;
    user-select: none;
    touch-action: none; /* Important pour le tactile */
}

.annotation-container:active {
    cursor: grabbing;
}

.annotation-label {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.annotation-label:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

/* Responsive pour les annotations */
@media (max-width: 768px) {
    .annotation-label {
        font-size: 12px;
        padding: 6px 10px;
        max-width: 120px;
        white-space: normal;
        word-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .annotation-label {
        font-size: 11px;
        padding: 4px 8px;
        max-width: 100px;
    }
}

/* Texte au-dessus du plan */
.circuit-plan-wrapper p {
    font-style: italic;
    color: #555;
    margin-bottom: 10px;
    text-align: right;
}

/* Styles pour les symptômes et phases */
.symptom {
    margin-right: 10px;
}

#phasesContainer,
#causesContainer,
#solutionsContainer {
    margin-top: 10px;
}

/* Styles pour les notes et annotations */
div.solution {
    background-color: #e0f7fa;
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    font-style: italic;
}

/* Style moto */
.moto {
    font-size: 25px;
    margin-bottom: 15px;
    color: white;
}
#motoSettings {
margin-top: 20px;
}

.reglages-container {
  display: flex;
  gap: 40px;
  margin-top: 20px;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.reglage-section {
  flex: 0 0 45%;
  box-sizing: border-box;
  margin-top: -30px;
}

.label-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 500;
}
.label-input-demultiplication-label{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: -15px;
  font-weight: 500;
}
.text-input-inline {
  flex: 1;
  padding: 6px 8px;
  font-size: 14px;
  width: 40%; /* ou fixe comme 600px */
  max-width:120px;
}

h3 {
  margin-bottom: 15px;
  font-size: 25px;
  color: #000000;
}
.titre-pression-pneu {
 font-size: 25px;
  margin-top: 45px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin-bottom: 20px;
}
/* Conteneur global (pas de bordure, pas de fond) */
.aide-mecanique-container {
  font-family: Rajdhani, sans-serif;
  margin-top: 20px;
}


/* Style pour le bouton de diagnostic */
button[onclick="sendProblem()"] {
  background-color: #007bff;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[onclick="sendProblem()"]:hover {
  background-color: #0056b3;
}

/* Titre principal simple */
.titre-principal {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: left;
}

.couleur1 {
  color: #ff0000; /* Bleu par exemple */
  font-weight: bolder;
  font-size: 40px;
}

.couleur2 {
    color: #020101; /* Orange par exemple */
    font-weight: bolder;
    font-size: 40px;
}

/* Onglets sous forme de liens simples */
.tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
}

.tab-link {
  background: none;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.tab-link:hover {
  color: #000;
}

.tab-link.active {
  font-weight: 600;
  color: #000;
  border-color: #ffffff; /* couleur bleu pour active */
}

/* Contenu des onglets */
.tab-content {
  display: none;
  color: #444;
  font-size: 1rem;
  line-height: 1.4;
}
.tab-content-active {
  padding: 20px;
  background-color: #fff;
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  color: black;
}
.active {
  display: block;
}
.tab-content.active {
  display: block;
}
.pression-pneu-bloc {
  width: 10%; /* ou fixe comme 600px */
  max-width: 60px;
  padding: 20px;
  margin: 0 auto; /* pour centrer */
  box-sizing: border-box;
}
.tab-button {
  padding: 10px 20px;
  background-color: transparent; /* fond transparent par défaut */
  color: #000000; /* couleur texte principale */
  border: none;
  border-bottom: 3px solid transparent; /* simule un onglet */
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  margin-right: 10px;
}

.tab-button:hover {
  border-bottom: 3px solid #fdfdfd;
}

.tab-button.active {
  font-weight: bold;
  border-bottom: 3px solid #ff0000; /* onglet actif */
  color: #000;
}
/* Conteneur principal style "onglet" */
#reglage {
    padding: 20px;
    background-color: #fff;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    color: black;

}

/* Titre */
#reglage h2 {
  font-size: 30px;
  margin-bottom: 20px;
  color: #000000;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 8px;
}

/* Paragraphe classique */
#reglage p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* Tableau avec style modernisé */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

table thead {
  background-color: #2c3e50;
  color: #fff;
}

table th,
table td {
  padding: 12px 20px;
  border: 1px solid #ddd;
  text-align: center;
}

table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

/* Texte sous le tableau centré et plus petit */
.centered-note {
  text-align: center;
  font-size: 13px;
  margin-top: 12px;
  color: #666;
  font-style: italic;
}

/* Bloc guide avec marges */
.free-sag-guide {
  margin-top: 40px;
}

.free-sag-guide h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #2c3e50;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

.free-sag-guide h4 {
  font-size: 18px;
  margin-top: 30px;
  color: #2c3e50;
}

.free-sag-guide ul {
  margin-left: 20px;
  margin-top: 10px;
}

.free-sag-guide li {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Note importante avec style "alerte douce" */
.note-importante {
  background-color: #fff3cd;
  border-left: 6px solid #ffc107;
  padding: 18px 24px;
  margin-top: 35px;
  font-size: 14px;
  color: #856404;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
}
.optimize-settings {
    padding: 20px;
    background-color: #fff;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    color: black;
}

.optimize-settings h2 {
  color: #000000;
  border-bottom: 2px solid #000000;
  padding-bottom: 8px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 30px;
}

.optimize-settings p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #000000;
  margin-bottom: 25px;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.features-list li {
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px 20px;
  border-radius: 8px;
  min-width: 160px;
  font-weight: 600;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  cursor: default;
  transition: box-shadow 0.3s ease;
}

.features-list li:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.features-list .icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  object-fit: contain;
}
/* RESPONSIVE DESIGN */
/* Styles de base pour le tableau */
/* Styles de base pour le tableau */
.table-container {
  max-width: 900px;
  margin: 20px auto;
  font-family: Rajdhani, sans-serif;
  color: #222;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}
th, td {
  border: 1px solid #aaa;
  padding: 10px;
  text-align: left;
}
th {
  background-color: #004aad;
  color: white;
}
tbody tr:nth-child(even) {
  background-color: #f3f6ff;
}
caption {
  font-size: 25px;
  margin-bottom: 10px;
  font-weight: bold;
  color: #000204;
}
.note {
  font-style: italic;
  color: #555;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive pour écrans ≤ 1024px */
@media screen and (max-width: 1024px) {
  .roulage-wrapper,
  .reglages-container {
    flex-direction: column;
    gap: 20px;
  }

  .reglage-section,
  .sub-section,
  .circuit-plan-wrapper {
    flex: 1 1 100%;
    max-width: 100%;
    margin-top: auto;
  }
  
  /* Amélioration du plan de circuit en responsive */
  .circuit-plan-wrapper {
    text-align: center;
  }
  
  .circuit-plan-wrapper h2 {
    text-align: center;
    margin-bottom: 10px;
  }
  
  .circuit-plan-wrapper p {
    text-align: center;
  }
  
  #circuitPlan {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
  }
}

  .label-large {
    font-size: 24px;
    white-space: normal;
    text-align: center;
  }

  .label-large2,
  .label-nom-circuit,
  .label-temp-piste,
  .label-temp-exterieure,
  .label-input,
  .label-meteo {
    font-size: 18px;
  }

  input[type="text"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    width: auto;
    max-width: auto;
  }

  .form-block {
    max-width: 100%;
  }

  .btn-save {
    font-size: 1rem;
    padding: 12px;
    max-width: 100%;
  }

  .icone-technique,
  .icone-performance {
    height: 50px;
  }

  .titre-principal {
    font-size: 30px;
    text-align: center;
    white-space: normal;
  }

  .performance-title,
  .performance {
    text-align: center;
    margin-top: 20px;
  }

  .tabs {
    flex-direction: flex;
    gap: 10px;
    flex-direction: column-reverse;
  }

  .tab-link {
    font-size: 1rem;
    padding: 8px 0;
    width: 100%;
    text-align: left;
  }

/* Responsive pour écrans ≤ 600px */
@media screen and (max-width: 600px) {
  .label-large {
    font-size: 20px;
  }

  .text-input-inline {
    width: 100%;
    max-width: 100%;
  }

  h3 {
    font-size: 1rem;
  }

  .titre-pression-pneu {
    font-size: 1rem;
  }

  .btn-save {
    padding: 10px;
  }

  /* Adaptation tableau pour mobile, 3 colonnes en mode blocs verticaux */
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead tr {
    display: none; /* Cache les en-têtes sur mobile */
  }

  tbody tr {
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    background-color: white;
  }

  tbody td {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 8px 5px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    display: inline-block;
  }

  tbody td:last-child {
    border-bottom: none;
    text-align: center;
  }
  
  /* Améliorations spécifiques pour le plan de circuit sur mobile */
  #circuitPlan {
    width: 100%;
    max-width: 100%;
    min-height: 300px;
    margin: 0;
  }
  
  .circuit-plan-wrapper {
    padding: 10px;
  }
  
  .circuit-plan-wrapper h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  .circuit-plan-wrapper p {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  /* Amélioration des annotations sur mobile */
  .annotation-label {
    font-size: 11px;
    padding: 4px 8px;
    max-width: 80px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
  }
  
  /* Boutons de zoom plus grands sur mobile */
  #circuitPlan button {
    width: 40px !important;
    height: 40px !important;
    font-size: 24px !important;
  }
}

#guide {
  font-size: 30px;
  margin-bottom: 20px;
  color: #000000;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 8px;
}
#probleme {
  font-size: 30px;
  margin-bottom: 20px;
  color: #000000;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 8px;
}
.titre-demul {
  text-align: left;
  font-size: 30px;
  margin-bottom: 20px;
  color: #000000;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 8px;
}

#btn-calculer-demul {
  margin-top: 1em;
  padding: 0.5em 1em;
}

.zone-resultat {
  margin-top: 1em;
  font-weight: bold;
}

.bloc-formule-demul,
.bloc-explication-demul {
  margin-top: 2em;
  padding: 1em;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.bloc-formule-demul p,
.bloc-explication-demul p {
  margin: 0.5em 0;
}


/* Responsive pour écrans ≤ 600px */
@media screen and (max-width: 600px) {
    .label-large {
        font-size: 20px;
    }

    .text-input-inline {
        width: 100%;
        max-width: 100%;
    }

    h3 {
        font-size: 1rem;
    }

    .titre-pression-pneu {
        font-size: 1rem;
    }

    .btn-save {
        padding: 10px;
    }

    /* Adaptation tableau pour mobile */
    thead tr {
        display: none;
    }

    tbody tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 6px;
        padding: 10px;
        background-color: white;
    }

    tbody td {
        border: none;
        border-bottom: 1px solid #eee;
        padding: 8px 5px;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
    }

    tbody td:last-child {
        border-bottom: none;
        text-align: center;
    }
}

/* Conteneur général */
#tension {
    padding: 20px;
    background-color: #fff;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    color: black;
}

/* Titres principaux */
#tension h2 {
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 30px;
}

/* Titres secondaires */
#tension h3 {
    color: #000000;
    margin-top: 30px;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Paragraphes */
#tension p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Listes */
#tension ul {
    margin-left: 20px;
    margin-bottom: 18px;
    line-height: 1.5;
    list-style-type: disc;
    color: #333;
}

#tension ul ul {
    list-style-type: circle;
    margin-top: 8px;
}

/* Table */
#tension table.table-kitchaine {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #222;
}

#tension table.table-kitchaine thead {
    background-color: #000000;
    color: white;
}

#tension table.table-kitchaine th,
#tension table.table-kitchaine td {
    padding: 10px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

#tension table.table-kitchaine tbody tr:nth-child(odd) {
    background-color: #f0f6fc;
}

/* Encadré conseils */
#tension .note-conseils-chaine {
    background-color: #d9edf7;
    border-left: 6px solid #246b9a;
    padding: 15px 20px;
    font-size: 1rem;
    color: #000000;
    border-radius: 4px;
    line-height: 1.5;
    margin-top: 25px;
}

/* Emojis un peu plus grands */
#tension ul li::before {
    content: '• ';
    color: #070a0c;
    font-weight: bold;
    display: inline-block;
    width: 1em;
}

/* Liens ou mentions importantes */
#tension strong {
    color: #000000;
    font-weight: 600;
}

#guide {
    font-size: 30px;
    margin-bottom: 20px;
    color: #000000;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 8px;
}

#probleme {
    font-size: 30px;
    margin-bottom: 20px;
    color: #000000;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 8px;
}

.titre-demul {
    text-align: left;
    font-size: 30px;
    margin-bottom: 20px;
    color: #000000;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 8px;
    margin-top: 20px;
}

#btn-calculer-demul {
  margin-top: 1em;
  padding: 0.6em 1.2em;
  background-color: #007bff; /* bleu moderne */
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#btn-calculer-demul:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}


.zone-resultat {
    margin-top: 1em;
    font-weight: bold;
}

.bloc-formule-demul,
.bloc-explication-demul {
    margin-top: 2em;
    padding: 1em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.bloc-formule-demul p,
.bloc-explication-demul p {
    margin: 0.5em 0;
}


.exemple-visuel {
    margin: 20px 0;
    text-align: center;
}

.exemple-visuel img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.table-kitchaine {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-kitchaine th,
.table-kitchaine td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table-kitchaine th {
    background-color: #ff4444;
    color: white;
    font-weight: 600;
}

.table-kitchaine tr:nth-child(even) {
    background-color: #f8f8f8;
}

.table-kitchaine tr:hover {
    background-color: #f0f0f0;
}

/* Style pour les emojis */
#tension .emoji {
    font-size: 1.2em;
    margin-right: 5px;
}

/* Responsive design pour la section tension */
@media screen and (max-width: 768px) {
    #tension {
        padding: 15px;
    }

    #tension h2 {
        font-size: 30px;
    }

    #tension h3 {
        font-size: 18px;
    }

    .table-kitchaine th,
    .table-kitchaine td {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* Styles pour le titre principal de la fiche diagnostic */
.titre-principal-diagnostic {
    position: relative;
    top: 0px;
    margin-bottom: 10px;
    display: inline-block;
    padding: 0 20px;
    z-index: 2;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 20px;
}

.titre-principal-diagnostic .noir {
    color: #000000;
    font-weight: 800;
    margin-top: 20px;
}

.titre-principal-diagnostic .rouge {
    color: #ff0000;
    font-weight: 800;
}

/* Styles pour les blocs de pression recommandée */
.pression-recommandee-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pression-bloc {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
    max-width: 300px;
}

.pression-bloc h4 {
    color: #000;
    font-size: 18px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #ff0000;
}

.pression-valeur {
    font-size: 24px;
    color: #ff0000;
    font-weight: bold;
    margin: 15px 0;
}

.pression-note {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    color: #666;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    border-left: 3px solid #ff0000;
}

#pressPneu {
    margin-top: 30px;
}
/* Styles pour l'aide mécanique */
.aide-mecanique-container {
  padding: 20px;
  font-family: Rajdhani, sans-serif;
  margin-top: 20px;
}


/* Styles pour l'aide mécanique */
#aide-meca h2 {
  font-size: 30px;
  color: #000;
  margin-bottom: 25px;
  font-weight: bold;
  text-align: left;
  border-bottom: 2px solid #000000;
  padding-bottom: 8px;

}

#result {
  margin-top: 20px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  
}

#result p {
  font-size: 18px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 15px;
}

#result h3 {
  font-size: 24px;
  color: #000;
  margin-top: 20px;
  margin-bottom: 15px;
  font-weight: 600;
}

#result ul {
  font-size: 18px;
  color: #333;
  margin-left: 20px;
  margin-bottom: 15px;
}

#result li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Style pour le champ de saisie */
#moto-problem {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
}

#moto-problem:focus {
  border-color: #007bff;
  outline: none;
}

/* Style pour le bouton de diagnostic */
button[onclick="sendProblem()"] {
  background-color: #007bff;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[onclick="sendProblem()"]:hover {
  background-color: #0056b3;
}

/* Styles pour le système de diagnostic */
#moto-problem {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
}

#result {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#result h3 {
    color: #333;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

#result ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

#result li {
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.phase-analysis, .element-analysis, .consequences-analysis, .solutions-analysis {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.phase-analysis h4, .element-analysis h4, .consequences-analysis h4, .solutions-analysis h4 {
    color: #007bff;
    margin: 0 0 10px 0;
}

.suggestions {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
}

.suggestions h4 {
    color: #856404;
    margin: 0 0 10px 0;
}

.suggestions ul {
    margin: 0;
    padding-left: 20px;
}

/* Nouveaux styles pour l'affichage amélioré */
.phase-tag {
    display: inline-block;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin: 2px;
}

.solutions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.solution-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.solution-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.solution-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.solution-rank {
    background: #007bff;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.solution-header h5 {
    margin: 0;
    color: #333;
    font-size: 16px;
    flex: 1;
    margin-left: 12px;
}

.relevance-score {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.solution-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phase-info, .consequences-info, .solution-info, .keywords-info {
    padding: 8px;
    border-radius: 4px;
    background: #f8f9fa;
}

.phase-info {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.consequences-info {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
}

.solution-info {
    background: #e8f5e8;
    border-left: 3px solid #4caf50;
}

.keywords-info {
    background: #f3e5f5;
    border-left: 3px solid #9c27b0;
}

.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.keyword-tag {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* Styles pour le bouton de recherche IA */
#aiSearchButton {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#aiSearchButton:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#aiSearchButton:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .solution-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .solution-header h5 {
        margin-left: 0;
    }
    
    .keywords-tags {
        justify-content: flex-start;
    }
    
    .solution-item {
        padding: 12px;
    }
}

/* Styles pour les exemples de problèmes */
.examples-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.examples-section h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.examples-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.example-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.example-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #007bff;
}

.example-item h4 {
    color: #007bff;
    margin: 0 0 8px 0;
    font-size: 16px;
}

.example-item p {
    color: #666;
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.example-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.example-keywords .keyword-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* Responsive pour les exemples */
@media (max-width: 768px) {
    .examples-list {
        grid-template-columns: 1fr;
    }
    
    .example-item {
        padding: 12px;
    }
}

.label-pneu {
margin-top: 20px;
}
.container-principale {
  display: flex;
  gap: 40px; /* espace entre les deux sections */
  align-items: flex-start; /* alignement en haut */
  margin-top: 20px;
}

/* largeur pour les sections, tu peux ajuster */
.reglage-section {
  flex: 1;
  max-width: 400px;
}

.section-droite {
  flex: 1;
  max-width: 600px;
}

/* Styles étoiles */
.star-rating {
  direction: rtl;
  font-size: 24px;
  unicode-bidi: bidi-override;
  display: inline-flex;
}

.star-rating input[type="radio"] {
  display: none;
}

.star-rating label {
  color: #ccc;
  cursor: pointer;
  padding: 0 4px;
  user-select: none;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input[type="radio"]:checked ~ label {
  color: gold;
}

/* Style des inputs inline */
.text-input-inline {
  display: inline-block;
  width: 60px;
  margin-left: 8px;
}
.bloc-principal {
  width: 480px;               /* ✅ Largeur définie (tu peux ajuster) */
  padding: 20px;
  background-color: #ff000012;
  border: 2px solid #f75656;
  display: inline-block;
  float: right;
  resize: both;               /* Permet de redimensionner à la souris */
  margin-top: -293px;
  margin-right: 80px;
  text-align: center;
  font-size: 15px;
  border-radius: 10px;        /* Bords arrondis */
  box-sizing: border-box;  
  height: 400px;
}

.sous-bloc {
  margin-top: 15px;
  padding: 15px;
  background-color: #ffffff;
  border: 1px solid #999;
  border-radius: 8px;
}
.Démultiplication{
font-size: 25px;
font-weight: bold;
margin-top: 20px;
margin-bottom: 20px;
}
.titre-ressenti {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  text-align: center;
  border-bottom: 2px solid #ccc;
  padding-bottom: 8px;
  border-radius: 5px;
}
#zoomControls {
  margin-top: 10px;
}
#zoomControls button {
  font-size: 18px;
  padding: 5px 10px;
  margin-right: 5px;
  cursor: pointer;
}
@media screen and (max-width: 768px) {
  .container-principale {
    flex-direction: column;
    gap: 20px;
  }

  .reglage-section,
  .section-droite {
    max-width: 100%;
    width: 100%;
  }

  .bloc-principal {
    float: none;
    width: 100%;
    height: auto;
    margin: 20px 0;
    padding: 15px;
  }

  .text-input-inline {
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }

  .star-rating {
    font-size: 20px;
    justify-content: center;
  }

  .diagnostic-form textarea {
    font-size: 14px;
  }

  .diagnostic-form button {
    width: 100%;
    font-size: 15px;
  }

  .sous-bloc {
    padding: 10px;
  }
}

/* Très petit écran (mobile portrait) */
@media screen and (max-width: 480px) {
  .titre-ressenti {
    font-size: 18px;
  }

  .Démultiplication {
    font-size: 20px;
  }

  #zoomControls button {
    font-size: 16px;
    padding: 4px 8px;
  }

  .ai-solutions, .suggestions {
    padding: 10px;
  }

  .ai-solutions li, .suggestions li {
    font-size: 14px;
  }
}
.label-nom-circuit-kart {
  font-size: 20px;
  display: block;
  margin-bottom: 20px;
  color: rgb(0, 0, 0);
  margin-top: 20px;
}

.label-nom-circuit-kart select.input-block-kart {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  width: 100%;
  max-width: 300px;
}
.annotation-container:hover {
  filter: drop-shadow(0 0 5px rgba(231, 76, 60, 0.7));
}

.annotation-label {
  user-select: text;
  pointer-events: auto;
}

.annotation-handle:hover {
  box-shadow: 0 0 10px 3px rgba(231, 76, 60, 0.9);
}

/* Styles pour les boutons du diagnostic */
.diagnostic-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.diagnostic-buttons button {
    flex: 1;
    min-width: 200px;
}

.examples-btn {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.examples-btn:hover {
    background: linear-gradient(135deg, #5a6268, #343a40) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

@media (max-width: 768px) {
    .diagnostic-buttons {
        flex-direction: column;
    }
    
    .diagnostic-buttons button {
        min-width: auto;
    }
}

/* Styles pour l'analyse de contexte */
.context-analysis {
    margin: 15px 0;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.context-analysis h4 {
    color: #1976d2;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.context-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.context-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.context-tag.condition {
    background: #4caf50;
}

.context-tag.temperature {
    background: #ff9800;
}

.context-tag.severity {
    background: #f44336;
}

.context-tag.severity.low {
    background: #4caf50;
}

.context-tag.severity.medium {
    background: #ff9800;
}

.context-tag.severity.high {
    background: #f44336;
}

/* Amélioration des solutions */
.solution-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.context-match-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
}

.solution-item.context-match {
    border: 2px solid #ff6b6b;
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.2);
}

.solution-item.context-match:hover {
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

/* Amélioration des scores de pertinence */
.relevance-score {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* Amélioration des phases avec scores */
.phase-tag {
    display: inline-block;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin: 2px;
    position: relative;
}

.phase-tag::after {
    content: attr(data-score);
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffc107;
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

/* Responsive pour les nouveaux éléments */
@media (max-width: 768px) {
    .context-info {
        flex-direction: column;
    }
    
    .solution-meta {
        align-items: flex-start;
        margin-top: 8px;
    }
    
    .solution-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Amélioration des exemples */
.examples-intro {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.example-context {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
}

.example-item h4 {
    color: #007bff;
    margin: 0;
    font-size: 16px;
}

/* Styles pour les sections de démonstration et statistiques */
.demo-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.demo-section h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.stats-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stats-section h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-item h4 {
    font-size: 2em;
    color: #007bff;
    margin: 0 0 10px 0;
}

.stat-item p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.categories-breakdown {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.categories-breakdown h4 {
    color: #333;
    margin-bottom: 15px;
}

.categories-breakdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-breakdown li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.categories-breakdown li:last-child {
    border-bottom: none;
}

/* Responsive pour les statistiques */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-item h4 {
        font-size: 1.5em;
    }
}

.demo-btn {
    background: linear-gradient(135deg, #9c27b0, #673ab7) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.demo-btn:hover {
    background: linear-gradient(135deg, #7b1fa2, #512da8) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Styles pour l'analyse IA */
.ai-analysis-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.ai-analysis-section h3 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ai-diagnostic {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.ai-diagnostic h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 18px;
}

.ai-diagnostic-content p {
    margin: 8px 0;
    color: white;
}

.severity-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.severity-badge.high {
    background: #ff4757;
    color: white;
}

.severity-badge.medium {
    background: #ffa502;
    color: white;
}

.severity-badge.low {
    background: #2ed573;
    color: white;
}

.ai-solutions {
    margin: 20px 0;
}

.ai-solutions h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 18px;
}

.ai-solutions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-solution-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-solution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-solution-rank {
    background: #ffd700;
    color: #333;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.ai-solution-header h5 {
    color: white;
    margin: 0;
    font-size: 16px;
    flex: 1;
}

.ai-confidence {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.ai-solution-content p {
    color: white;
    margin: 8px 0;
}

.ai-solution-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-solution-content li {
    color: white;
    margin: 5px 0;
}

.ai-warning {
    background: rgba(255, 71, 87, 0.3);
    border: 1px solid #ff4757;
    color: #ffd700;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-weight: bold;
}

.ai-advice {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

.ai-advice h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 18px;
}

.ai-advice ul {
    margin: 0;
    padding-left: 20px;
}

.ai-advice li {
    color: white;
    margin: 8px 0;
}

.ai-checks {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

.ai-checks h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 18px;
}

.checks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.check-number {
    background: #ffd700;
    color: #333;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.check-text {
    flex: 1;
}

/* Styles pour le fallback local */
.ai-fallback {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #6c757d;
}

.ai-fallback h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.local-ai-diagnostic,
.local-ai-solutions,
.local-ai-advice {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.local-ai-diagnostic h4,
.local-ai-solutions h4,
.local-ai-advice h4 {
    color: #007bff;
    margin-bottom: 10px;
}

.advanced-solutions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.advanced-solution-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.advanced-solution-item h5 {
    color: #333;
    margin-bottom: 10px;
}

.advanced-solution-item p {
    color: #666;
    margin-bottom: 10px;
}

.advanced-solution-item ul {
    margin: 0;
    padding-left: 20px;
}

.advanced-solution-item li {
    color: #666;
    margin: 5px 0;
}

/* Responsive pour l'IA */
@media (max-width: 768px) {
    .ai-solution-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ai-solution-header h5 {
        margin: 10px 0;
    }
    
    .ai-analysis-section {
        padding: 15px;
    }
    
    .ai-solution-item {
        padding: 12px;
    }
}

/* Styles pour le guide d'utilisation de l'IA */
.ai-guide-section {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.ai-guide-section h3 {
    color: white;
    margin-bottom: 25px;
    text-align: center;
    font-size: 26px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.guide-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.guide-section h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.guide-section ol,
.guide-section ul {
    margin: 0;
    padding-left: 20px;
}

.guide-section li {
    color: white;
    margin: 8px 0;
    line-height: 1.5;
}

.guide-section strong {
    color: #ffd700;
}

.warning-box {
    background: rgba(255, 71, 87, 0.2);
    border: 2px solid #ff4757;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.warning-box p {
    color: white;
    margin: 8px 0;
    font-weight: 500;
}

.warning-box strong {
    color: #ffd700;
}

.guide-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.guide-actions button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.guide-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive pour le guide */
@media (max-width: 768px) {
    .ai-guide-section {
        padding: 20px;
    }
    
    .guide-section {
        padding: 15px;
    }
    
    .guide-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .guide-actions button {
        width: 100%;
        max-width: 300px;
    }
}

/* Styles pour les correspondances exactes */
.exact-match {
    border: 2px solid #2ed573 !important;
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.1) 0%, rgba(46, 213, 115, 0.05) 100%) !important;
}

.exact-match-badge {
    background: #2ed573;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 8px;
}

.context-match-badge {
    background: #ffa502;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 8px;
}

/* Amélioration de l'affichage des solutions */
.solution-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.solution-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.solution-rank {
    background: #007bff;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.solution-header h5 {
    color: white;
    margin: 0;
    font-size: 16px;
    flex: 1;
}

.solution-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.relevance-score {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.solution-details {
    padding: 15px;
}

.phase-info,
.consequences-info,
.solution-info,
.keywords-info {
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.keyword-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

/* Responsive pour les solutions */
@media (max-width: 768px) {
    .solution-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .solution-header h5 {
        margin: 10px 0;
    }
    
    .solution-meta {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Styles pour la nouvelle interface de recherche */
.search-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.ai-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.error-message {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

/* Styles pour les résultats de recherche */
.search-results {
    margin-top: 30px;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #007bff;
}

.search-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.ai-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.local-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* Analyse locale */
.local-analysis {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.local-analysis h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.analysis-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007bff;
}

.analysis-item strong {
    color: #333;
    display: block;
    margin-bottom: 10px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.phase-tag {
    background: #e3f2fd;
    color: #1976d2;
}

.context-tag {
    background: #fff3e0;
    color: #f57c00;
}

/* Solutions */
.solutions-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.solutions-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.solution-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.solution-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.solution-card.exact-match {
    border-color: #2ed573;
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.1) 0%, rgba(46, 213, 115, 0.05) 100%);
}

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.solution-number {
    background: #007bff;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.solution-header h5 {
    color: #333;
    margin: 0;
    font-size: 16px;
    flex: 1;
}

.relevance-score {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.solution-content p {
    margin: 8px 0;
    color: #666;
    line-height: 1.5;
}

.solution-content strong {
    color: #333;
}

.keywords {
    color: #007bff;
    font-style: italic;
}

.exact-match-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2ed573;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

/* Résultats IA */
.ai-results {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.ai-results h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ai-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ai-diagnostic,
.ai-solutions,
.ai-advice {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.ai-diagnostic h5,
.ai-solutions h5,
.ai-advice h5 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 18px;
}

.ai-solutions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-solution-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-solution-item h6 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 16px;
}

.ai-solution-item p {
    color: white;
    margin-bottom: 10px;
    line-height: 1.5;
}

.ai-solution-item ul {
    margin: 0;
    padding-left: 20px;
}

.ai-solution-item li {
    color: white;
    margin: 5px 0;
}

.ai-advice ul {
    margin: 0;
    padding-left: 20px;
}

.ai-advice li {
    color: white;
    margin: 8px 0;
    line-height: 1.5;
}

/* Suggestions */
.suggestions-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.suggestions-section h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 18px;
}

.suggestions-section ul {
    margin: 0;
    padding-left: 20px;
}

.suggestions-section li {
    color: #856404;
    margin: 8px 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .search-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .solution-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .solution-header h5 {
        margin: 10px 0;
    }
}

/* Styles pour le guide du nouveau système */
.new-system-guide {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.new-system-guide h3 {
    color: white;
    margin-bottom: 25px;
    text-align: center;
    font-size: 26px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.guide-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.guide-section h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.guide-section ol,
.guide-section ul {
    margin: 0;
    padding-left: 20px;
}

.guide-section li {
    color: white;
    margin: 8px 0;
    line-height: 1.5;
}

.guide-section strong {
    color: #ffd700;
}

.results-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.preview-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.preview-item h5 {
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 16px;
}

.preview-item p {
    color: white;
    font-size: 14px;
    margin: 0;
}

.warning-box {
    background: rgba(255, 71, 87, 0.2);
    border: 2px solid #ff4757;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.warning-box p {
    color: white;
    margin: 8px 0;
    font-weight: 500;
}

.warning-box strong {
    color: #ffd700;
}

.guide-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.guide-actions button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.guide-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.test-btn {
    background: linear-gradient(135deg, #2ed573 0%, #1e90ff 100%) !important;
}

.examples-btn {
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%) !important;
}

/* Responsive pour le guide */
@media (max-width: 768px) {
    .new-system-guide {
        padding: 20px;
    }
    
    .guide-section {
        padding: 15px;
    }
    
    .results-preview {
        grid-template-columns: 1fr;
    }
    
    .guide-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .guide-actions button {
        width: 100%;
        max-width: 300px;
    }
}

/* Style pour le bouton de recherche combinée */
.combined-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.combined-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.combined-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* Style pour les tags de problèmes */
.problem-tag {
    background: #e8f5e8;
    color: #2d5a2d;
    border: 1px solid #4caf50;
}

/* Style pour le fallback IA */
.ai-fallback {
    background: #f8f9fa;
    border: 2px solid #6c757d;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.ai-fallback h4 {
    color: #333;
    margin-bottom: 10px;
}

.ai-fallback p {
    color: #666;
    margin: 0;
}

/* Styles pour le test de précision */
.precision-test {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #28a745;
}

.precision-test h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
}

.test-cases {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.test-case {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 3px solid #007bff;
}

.test-case h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.test-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.problems-detected,
.phases-detected,
.solutions-count {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.problems-detected strong,
.phases-detected strong,
.solutions-count strong {
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.test-summary {
    margin-top: 25px;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
}

.test-summary h4 {
    color: #155724;
    margin-bottom: 15px;
}

.test-summary ul {
    margin: 0;
    padding-left: 20px;
}

.test-summary li {
    color: #155724;
    margin: 8px 0;
    line-height: 1.5;
}

/* Style pour le bouton de test */
.test-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* --- Améliorations UX/UI supplémentaires --- */

.bloc-principal, .sub-section, .circuit-plan-wrapper, .reglage-section, .section-droite, .bloc-formule-demul, .bloc-explication-demul, .container-principale, .aide-mecanique-container, .note, .zone-resultat, .bloc-guide, .bloc-principal, .bloc-explication-demul {
  border-left: none;
  transition: none;
}
.bloc-principal:hover, .sub-section:hover, .circuit-plan-wrapper:hover, .reglage-section:hover, .section-droite:hover, .bloc-formule-demul:hover, .bloc-explication-demul:hover, .container-principale:hover, .aide-mecanique-container:hover, .note:hover, .zone-resultat:hover, .bloc-guide:hover {
  box-shadow: none;
  border-left: none;
}

input, select, textarea, .btn-export-pdf, .examples-btn, #btn-calculer-demul {
  transition: border 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
}

/* Tableaux améliorés */
table {
  border-radius: 0;
  overflow: visible;
}
tbody tr:nth-child(even) {
  background: none;
}
tbody tr:hover {
  background: none;
  transition: none;
}

/* Responsive conservé */
@media screen and (max-width: 768px) {
  .bloc-principal, .sub-section, .circuit-plan-wrapper, .reglage-section, .section-droite {
    border-left: none;
  }
}

/* Lightbox overlay fix */
.lightbox-overlay {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}
.lightbox-overlay[style*="display: flex"] {
  display: flex !important;
}

@media screen and (max-width: 700px) {
  #freinage {
    max-width: 99vw !important;
    margin: 1.2rem auto !important;
    padding: 1.2rem 0.5rem 1rem 0.5rem !important;
    border-radius: 12px !important;
    font-size: 0.98em !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  }
  #freinage h2 {
    font-size: 1.2rem !important;
    margin-bottom: 0.7rem !important;
  }
  #freinage h3 {
    font-size: 1.05rem !important;
  }
  #freinage table {
    font-size: 0.95em !important;
    width: 100% !important;
    margin: 0.7rem auto !important;
    display: block;
    overflow-x: auto;
    border-radius: 8px !important;
    text-align: center !important;
  }
  #freinage table tbody,
  #freinage table thead {
    display: table;
    width: 100%;
    text-align: center;
  }
  #freinage table tr {
    display: table-row;
    width: 100%;
    text-align: center;
  }
  #freinage table td, #freinage table th {
    text-align: center !important;
    vertical-align: middle !important;
    margin: 0 auto !important;
    display: table-cell;
  }
  #freinage table {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  #freinage img {
    max-width: 98vw !important;
    height: auto !important;
    display: block !important;
    margin: 12px auto !important;
  }
}

/* Images frein et durite responsives */
.frein-img-responsive {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  background: #fafafa;
  cursor: zoom-in;
  transition: width 0.2s, height 0.2s, box-shadow 0.2s;
  max-width: 98vw;
  display: block;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .frein-img-responsive {
    width: 120px;
    height: 120px;
  }
}
@media (max-width: 600px) {
  .frein-img-responsive {
    width: 90px;
    height: 90px;
    max-width: 90vw;
  }
}

/* Images dans la lightbox responsive */
.lightbox-overlay img, .lightbox-img-responsive {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  background: #fff;
  display: block;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .lightbox-overlay img, .lightbox-img-responsive {
    max-width: 98vw;
    max-height: 60vh;
    border-radius: 8px;
  }
}

/* Responsive pour le calculateur de démultiplication */
.bloc-formule-demul, .bloc-explication-demul, #zone-resultat-demul {
  max-width: 600px;
  width: 100%;
  margin: 0 auto 1.5em auto;
  box-sizing: border-box;
  word-break: break-word;
}

@media (max-width: 900px) {
  .bloc-formule-demul, .bloc-explication-demul, #zone-resultat-demul {
    max-width: 90vw;
    padding: 0.7em 2vw;
    font-size: 0.98em;
    margin: 0 auto 1em auto;
  }
}
@media (max-width: 600px) {
  .bloc-formule-demul, .bloc-explication-demul, #zone-resultat-demul {
    max-width: 400px;
    width: 100vw;
    min-width: 0;
    padding: 0.3em 0.5em;
    font-size: 0.92em;
    border-radius: 7px;
    margin: 0 -2vw 0.7em -2vw;
    text-align: center;
    overflow-x: auto;
    box-sizing: border-box;
  }
  .titre-demul {
    font-size: 0.98em;
    text-align: center;
    padding: 0.2em 0;
    margin-bottom: 0.4em;
  }
  #btn-calculer-demul {
    width: 100%;
    font-size: 0.95em;
    margin: 0.4em 0;
  }
  #zone-resultat-demul {
    font-size: 0.95em;
    padding: 0.3em 0.2em;
  }
}

@media (max-width: 600px) {
  /* Place les inputs et le bouton en colonne sous le titre */
  .titre-demul + label,
  .titre-demul + label + label,
  .titre-demul + label + label + label,
  .titre-demul + label + label + label + button,
  .titre-demul + label + label + label + button + div.zone-resultat {
    display: block;
    width: 90vw;
    max-width: 350px;
    margin: 0.3em auto 0.3em auto;
    text-align: center;
  }
  .titre-demul + label input,
  .titre-demul + label + label input,
  .titre-demul + label + label + label input {
    width: 90vw;
    max-width: 350px;
    margin: 0.2em auto;
    display: block;
    text-align: center;
    font-size: 1em;
  }
  #btn-calculer-demul {
    margin-top: 0.5em;
  }
}

@media (max-width: 600px) {
  .titre-demul {
    text-align: center;
    font-size: 1.1em;
    margin-top: 1.2em;
    margin-bottom: 0.7em;
    padding: 0.2em 0;
    letter-spacing: 0.5px;
  }
  /* Nouveau conteneur pour le bloc calculateur */
  .demul-calc-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 1em 0.7em 1em 0.7em;
    margin: 0 auto 1.2em auto;
    max-width: 400px;
    width: 95vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
  }
  .demul-calc-container label,
  .demul-calc-container input,
  .demul-calc-container button,
  .demul-calc-container .zone-resultat {
    width: 100%;
    max-width: 350px;
    margin: 0.15em auto;
    text-align: center;
    font-size: 1em;
  }
  .demul-calc-container input {
    padding: 0.5em;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
  }
  .demul-calc-container button {
    margin-top: 0.4em;
    font-size: 1em;
    padding: 0.5em 0;
  }
  .demul-calc-container .zone-resultat {
    font-size: 0.98em;
    padding: 0.3em 0.2em;
    background: #f8f9fa;
    border-radius: 6px;
    min-height: 1.5em;
  }
}

@media (max-width: 600px) {
  .demul-calc-container,
  .bloc-formule-demul,
  .bloc-explication-demul {
    max-width: 98vw !important;
    width: 98vw !important;
    min-width: 0 !important;
    padding: 0.5em 1vw 0.5em 1vw !important;
    margin: 0 auto 1em auto !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    font-size: 0.97em !important;
    text-align: center !important;
    border-radius: 10px !important;
  }
  .bloc-formule-demul h3,
  .bloc-explication-demul h3 {
    font-size: 1em !important;
    margin-bottom: 0.5em !important;
  }
  .bloc-formule-demul p,
  .bloc-explication-demul p,
  .bloc-explication-demul ul,
  .bloc-explication-demul li {
    font-size: 0.97em !important;
    text-align: center !important;
    margin: 0.2em 0 !important;
    padding: 0 !important;
    word-break: break-word !important;
  }
  .bloc-explication-demul ul {
    padding-left: 1em !important;
    margin-bottom: 0.5em !important;
  }
}

@media (max-width: 700px) {
  .container-safe, .demul-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1.2em auto;
    padding: 0 2vw;
    box-sizing: border-box;
    display: block;
  }
  .demul-calc-container,
  .bloc-formule-demul,
  .bloc-explication-demul {
    width: 100%;
    max-width: 400px;
    min-width: 0;
    margin: 0.5em auto;
    box-sizing: border-box;
    font-size: 0.97em;
    border-radius: 10px;
    display: contents;
    padding: 0.7em 0.5em;
    text-align: left;
  }
  .titre-demul {
    text-align: center;
    margin-bottom: 0.7em;
  }
  .demul-calc-container label,
  .demul-calc-container input,
  .demul-calc-container button,
  .demul-calc-container .zone-resultat {
    width: 100%;
    max-width: 350px;
    min-width: 0;
    margin: 0.12em auto;
    text-align: left;
    font-size: 0.97em;
    box-sizing: border-box;
    display: block;
  }
  .bloc-formule-demul h3,
  .bloc-explication-demul h3 {
    font-size: 1em;
    margin-bottom: 0.5em;
    text-align: left;
  }
  .bloc-formule-demul p,
  .bloc-explication-demul p,
  .bloc-explication-demul ul,
  .bloc-explication-demul li {
    font-size: 0.97em;
    text-align: left;
    margin: 0.2em 0;
    padding: 0;
    word-break: break-word;
  }
  .bloc-explication-demul ul,
  .bloc-formule-demul ul {
    padding-left: 1em;
    margin-bottom: 0.5em;
    max-width: 98vw;
  }
  .bloc-explication-demul table,
  .bloc-formule-demul table {
    max-width: 98vw;
    width: 98vw;
    overflow-x: auto;
    display: block;
  }
}

@media (max-width: 700px) {
  /* ...autres règles... */
  .tab-content h2,
  .tab-content h3,
  .free-sag-guide h3,
  .free-sag-guide h4,
  .table-container caption,
  .aide-mecanique-container h2,
  .aide-mecanique-container h3 {
    text-align: center !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
  }
}


.titre-outil-supplementaire {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.titre-outil-supplementaire .outil-ligne,
.titre-outil-supplementaire .supplementaire-ligne {
  display: inline-block;
  font-size: 1.1em;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .titre-outil-supplementaire {
    flex-direction: column;
    gap: 0;
  }
  .titre-outil-supplementaire .outil-ligne,
  .titre-outil-supplementaire .supplementaire-ligne {
    display: block;
    font-size: 1em;
  }
  .titre-outil-supplementaire .supplementaire-ligne {
    font-size: 30px;
  }
}
